Calculated risk
Loll Holt,
Worsley, Manchester.
Your Computer, February 1982, page 74

When someone referred to my ZX-81 as a "glorified calculator", I began to won-
der if it would be really possible to make it perform like one. The resulting
program is really a basis for future development. You enter your calculation in
the usual form, e.g.:

                3*SIN  (PI/4) + 3

followed by Newline. The result is displayed at the top of the screen as on a 
calculator display. If you then enter another expression, the first result, 
stored as E, is forgotten while the new value is displayed. If, however, you
now enter:
            +SQR 32

the value of this - root 32 - is added, or whichever operation you want, to the
displayed number and the new result is printed. If you just press Newline, the
value at the top of the screen is stored in memory as a variable M. Thus the 
memory can be recalled by:	M (Newline)
and also used in calculations:
			        SQR M-4

It should not be difficult to expand this program, introducing such functions 
as more memories, percentages, a Clear function and constant.

Incidentally, the only ways out of this program are Stop or Break, both of 
which are bad programming but easier and quicker than checking to see if the 
user has input some special code meaning "stop".

In Golf, you play a ninehole course, and the length of each hole is random. 
To make stroke, hold down any key for a certain time the longer you hold it 
down the further the ball goes. Beware - the maximum distance is 200yd.

When you are within 30yd. of the pin the computer putts for you: two putts from
more than 5yd, one from less than 5yd. unless, of course, you chip into the 
hole. After some practice you should be able to complete the course at level par.

My final program is a mystery for you to solve. Type it in and find out what, 
if any, its purpose is. When you have discovered what it does, try working out 
how it does it. As a clue, it would take nearly 20 years to fill a line.